#!/bin/bash
set -e

USERNAME=ubuntu
mkdir -p /home/$USERNAME/.vnc/
echo "$VNC_PW" | vncpasswd -f > /home/$USERNAME/.vnc/passwd
chown -R $USERNAME:$USERNAME /home/$USERNAME/.vnc
chmod 600 /home/$USERNAME/.vnc/passwd

exec /usr/bin/supervisord -n -c /supervisord.conf
